package com.leyou.order.data.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author xhh
 * @since 2022-08-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="OrderGoodsItem对象", description="")
public class OrderGoodsItem implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(exist = false)
    private Integer cartId;

    @ApiModelProperty(value = "spu id")
    private Integer spuId;

    @ApiModelProperty(value = "sku id")
    private Integer skuId;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "地址id")
    private Integer mailId;

    @ApiModelProperty(value = "评论id")
    private Integer goodsCommentId;

    @ApiModelProperty(value = "明细订单编号")
    private String number;

    @ApiModelProperty(value = "父订单编号")
    private String fatherNumber;

    @ApiModelProperty(value = "购买数量")
    private Integer amount;

    @ApiModelProperty(value = "商品图片")
    private String goodsImage;

    @ApiModelProperty(value = "商品spu名称")
    private String goodsName;

    @ApiModelProperty(value = "商品sku名称")
    private String goodsSkuName;

    @ApiModelProperty(value = "付款金额")
    private BigDecimal flowPrice;

    @ApiModelProperty(value = "实际付款金额")
    private BigDecimal goodsPrice;

    @ApiModelProperty(value = "优惠金额")
    private BigDecimal discountPrice;

    @ApiModelProperty(value = "优惠信息")
    private String discountInfo;

    @ApiModelProperty(value = "是否支持退货")
    private Boolean canReturn;

    @ApiModelProperty(value = "-2 订单已过期,-1-已退款,0-已申请退款,1-待付款,2-待发货,3-待收货,4-待评价,5-已评价")
    private Integer state;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "下单时间")
    private Date orderTime;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifiedTime;

    @TableLogic
    private Integer deleted;


}
